/*
 * TOP SECRET
 * Copyright 2006-2015 Transsion.com All right reserved. This software is the
 * confidential and proprietary information of Transsion.com ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with Transsion.com.
 */
package com.palmplaystore.bigdata;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/** 
 * ClassName:ContextHolder <br/> 
 * Date:     2018年9月4日 下午3:01:10 <br/> 
 * @author   fenglibin 
 * @version  
 * @see       
 */
public class ContextHolder{
    private Logger              logger               = LoggerFactory.getLogger(ContextHolder.class);
    private static  ApplicationContext applicationContext;
   
    public static ApplicationContext getApplicationContext() {
    	if(null==applicationContext) {
    		applicationContext = new ClassPathXmlApplicationContext("classpath*:spring.xml");
    	}
        return applicationContext;
//        return AppUpdateTopo.getApplicationContext();
    }
    
    public static void initApplicationContext(ApplicationContext applicationContext) throws BeansException {
    	ContextHolder.applicationContext = applicationContext;
    }

}
